function [RWF] = calc_RWF(Mach, Rnf)

% Rnf = Fuselage Reynolds number

if Rnf < 3e6
    Rnf = 3e6;
end

Rnf

Mach_RWF_tab = [0.0 0.25 0.4 0.6 0.7 0.8 0.9];
Rnf_RWF_tab  = [3e6:1e6:9e6 1e7:1e7:9e7 1e8:1e8:7e8];

% Mach =      0.0    0.25    0.40    0.60    0.70    0.80    0.90        Rnf
RWF_table =[1.060	1.060	1.023	0.982	0.957   0.924   0.906;...    3e6
            1.064	1.064	1.025	0.985	0.960   0.927   0.909;...    4e6
            1.068	1.068	1.028	0.989	0.962   0.930   0.912;...    5e6
            1.071	1.071	1.029	0.991	0.964   0.933   0.914;...    6e6
            1.073	1.073	1.031	0.992	0.966   0.935   0.916;...    7e6
            1.075	1.075	1.032	0.994	0.967   0.937   0.917;...    8e6
            1.075	1.075	1.033	0.996	0.969   0.938   0.919;...    9e6
            1.075	1.075	1.035	0.998	0.971   0.940   0.921;...    1e7
            1.061	1.061	1.053	1.020	0.994   0.957   0.941;...    2e7
            1.042	1.042	1.050	1.042	1.010   0.984   0.968;...    3e7
            0.993	0.993	1.025	1.033	1.010   1.000   0.986;...    4e7
            0.972	0.972	1.007	1.025	1.010   1.010   1.000;...    5e7
            0.954	0.954	0.997	1.018	1.010   1.010   1.005;...    6e7
            0.942	0.942	0.990	1.011	1.010   1.010   1.010;...    7e7
            0.934	0.934	0.985	1.010	1.010   1.010   1.010;...    8e7
            0.928	0.928	0.984	1.010	1.010   1.010   1.010;...    9e7
            0.925	0.925	0.982	1.010	1.010   1.010   1.010;...    1e8
            0.920	0.920	0.979	1.010	1.010   1.010   1.010;...    2e8
            0.920	0.920	0.977	1.010	1.010   1.010   1.010;...    3e8
            0.920	0.920	0.976	1.010	1.010   1.010   1.010;...    4e8
            0.920	0.920	0.976	1.010	1.010   1.010   1.010;...    5e8
            0.920	0.920	0.976	1.010	1.010   1.010   1.010;...    6e8
            0.920	0.920	0.976	1.010	1.010   1.010   1.010];    % 7e8
    
RWF = interp2(Mach_RWF_tab, Rnf_RWF_tab, RWF_table, Mach, Rnf);



